package org.zhiyootech.base.domain;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class R {

    /**
     * 任务执行状态
     */
    private int status;
    /**
     * 返回信息
     */
    private String message;
    /**
     * jwt令牌
     */
    private BaseRequest.Token token;
    /**
     * 返回数据
     */
    private Object data;

    public R ok() {
        this.status = 200;
        return this;
    }

    public R fail() {
        this.status = 500;
        return this;
    }

}
